/*
 * TIMER.c
 *
 *  Created on: May 4, 2010
 *      Author: iandrono
 */

#include <avr/io.h>
#include <avr/eeprom.h>
#include "memoryManager.h"
#include "../defines.h"

int mem_start = 0;

void saveImageToEprom( imageType * image ) {
	int i,j,k;

	for( k=0 ; k<COLORS_Q_MAX ; k++) {
		for( i=0 ; i<ROWS_Q ; i++ ) {
			for( j=0 ; j<LEDS_Q_MAX/BYTE_SIZE ; j++) {
				eeprom_write_byte((uint8_t*)mem_start+(k*(LEDS_Q_MAX/BYTE_SIZE)*ROWS_Q*BYTE_SIZE)+(i*ROWS_Q*BYTE_SIZE)+(j*BYTE_SIZE), (*image)[k][i][j]);
			}
		}
	}
}



